package com.cykj.eurekaribbon.controller;

import com.cykj.eurekaribbon.bean.RouteInfo;
import com.cykj.eurekaribbon.service.RouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


/**
 * @version 1.0
 * @author: zhiMing
 * @date: 2021/9/22 9:00
 * @desc: 处理有关路线请求的控制层
 */
@RestController
public class RouteController {

    @Autowired
    RouteService routeService;

    /**
     * @version 1.0
     * @author: zhiMing
     * @date: 2021/9/22 9:00
     * @desc: 处理有关路线请求,将请求提交给service层
     */
    @RequestMapping("timeNodeList")
    private RouteInfo getTimeNodeList(@RequestBody Map<String,String> data){
        System.out.println(data.get("endStation")+data.get("routeName"));
       return routeService.getTimeNodeList(data.get("routeName"));
    }

}
